tinyMCE.init({
  mode: 'textareas',
  theme: 'advanced',
  setup: function(ed) {
    // Gets executed before DOM to HTML string serialization
    ed.onPreProcess.add(function(ed, o) {
      // State get is set when contents is extracted from editor
      if (o.get) {
        tinymce.each(ed.dom.select('script', o.node), function(n) {
          tinymce.DOM.remove(n);
        });
      }
    });
  },

  // Theme options
  theme_advanced_buttons1: 'bold,italic,underline,|,bullist,numlist,|,outdent,indent,|,link,unlink',
  theme_advanced_buttons2: '',
  theme_advanced_buttons3: '',
  theme_advanced_buttons4: '',
  theme_advanced_toolbar_location: 'top',
  theme_advanced_toolbar_align: 'left',
  theme_advanced_resizing: false,

  cleanup_on_startup: true,
  convert_newlines_to_brs: true,
  valid_elements: 'a[href],strong/b,em/i,u,p,ul,ol,li'
});